package student.list.updateStudent;

import com.mysql.MysqlMethod;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/student3")
public class DeleteStudent extends HttpServlet {
    @Override
    protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //获取前端传过来的studentId
        String  studentId1 = req.getParameter("studentId");
        int studentId = Integer.parseInt(studentId1);
        //调用方法删除学生信息
        MysqlMethod.delete01(studentId);
    }
}
